package com.juzi.wopu.query;

import org.apache.commons.lang3.StringUtils;
public class CanteenMenuQuery extends BaseQuery{
	
	private String sName;
	
	private String sMain;
	
	private Long iType;
	
	public String getsName() {
		return sName;
	}

	public void setsName(String sName) {
		this.sName = sName;
	}
	
	public String getSName() {
		return sName;
	}

	public void setSName(String sName) {
		this.sName = sName;
	}

	public String getsMain() {
		return sMain;
	}

	public void setsMain(String sMain) {
		this.sMain = sMain;
	}
	
	public String getSMain() {
		return sMain;
	}

	public void setSMain(String sMain) {
		this.sMain = sMain;
	}
	
	public Long getiType() {
		return iType;
	}

	public void setiType(Long iType) {
		this.iType = iType;
	}
	
	
	public Long getIType() {
		return iType;
	}

	public void setIType(Long iType) {
		this.iType = iType;
	}

	public CanteenMenuQuery() {
		super("CanteenMenu");
	}
	
	// 模糊查询条件
	@Override
	protected void addWhere() {
		// 菜品名称的高级查询条件
		if (StringUtils.isNotBlank(sName)) {
			AddWhere("o.sName like ?", "%" + sName + "%");
		}
		//菜品 烹饪方法的高级查询条件
		if (StringUtils.isNotBlank(sMain)) {
			AddWhere("o.sMain like ?", "%" + sMain + "%");
		}
		
		if(iType !=null && iType != -1L){
			  AddWhere("o.sysCode.iId=?", iType);
		}
	}
}
